package com.lijian.service.impl;

import com.lijian.dao.UserDao;
import com.lijian.pojo.User;
import com.lijian.service.UserService;
import com.lijian.utils.MD5Utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public User checkUserLogin(String username, String password) {
        User userLogin = userDao.findByUsernameAndPassword(username, MD5Utils.code(password));
        return userLogin;
    }
}
